package p270jp.pxv.android.model.pixiv_sketch;

import p097d7.ExoPlayer;
import p097d7.Player;
import p563v7.HlsMediaSource;

/* renamed from: jp.pxv.android.model.pixiv_sketch.LiveHlsMediaPlayer */
/* loaded from: classes2.dex */
public class LiveHlsMediaPlayer {
    private Player.AbstractC2639a eventListener;
    private final ExoPlayer exoPlayer;

    public LiveHlsMediaPlayer(ExoPlayer hVar) {
        this.exoPlayer = hVar;
    }

    public void addPlayerEventListener(Player.AbstractC2639a aVar) {
        this.eventListener = aVar;
        this.exoPlayer.mo7389A(aVar);
    }

    public boolean isIdle() {
        return this.exoPlayer.getPlaybackState() == 1;
    }

    public void playback() {
        this.exoPlayer.mo7369m(true);
    }

    public void release() {
        this.exoPlayer.release();
    }

    public void removePlayerEventListener() {
        Player.AbstractC2639a aVar = this.eventListener;
        if (aVar != null) {
            this.exoPlayer.mo7360x(aVar);
        }
    }

    public void setHlsMediaSource(HlsMediaSource iVar) {
        this.exoPlayer.mo7381a(iVar);
    }

    public void stop() {
        this.exoPlayer.mo7369m(false);
    }
}
